using System;
using NHServices.Contracts;

namespace NHServices.Core
{
    public abstract class ServiceFactory
    {
        
        public static Type SERVICE_FACTORY = typeof (FrameworkServiceFactory);
        public static ServiceFactory Instance(Type type)
        {
            try
            {
                return (ServiceFactory) Activator.CreateInstance(type);
            }
            catch (Exception)
            {
                throw new Exception("No se puede crear Servicio: " + type);
            }
        }

        public abstract IUserService GetUserService();
    }
}